package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 销售车实体类
 */
@TableName("t_sellcart")
@ApiModel(value = "销售车实体类", description = "封装销售车相关属性")
public class SellCartBean {
    /**
     * 销售车id
     */
    @TableId(value = "pk_sellCartId", type = IdType.AUTO)
    @ApiModelProperty("销售车编号")
    private Integer sellCartId;
    /**
     * 销售数量
     */
    @TableField("s_sellNum")
    @ApiModelProperty("销售数量")
    private Integer sellNum;
    /**
     * 库存商品id
     */
    @TableField("fk_productId")
    @ApiModelProperty("库存商品id")
    private String productId;
    /**
     * 销售员id
     */
    @TableField("fk_userId")
    @ApiModelProperty("销售员id")
    private Integer userId;
    /**
     * 库存商品
     */
    @TableField(exist = false)
    @ApiModelProperty("库存商品")
    private ProductBean product;
    /**
     * 销售员
     */
    @TableField(exist = false)
    @ApiModelProperty("销售员")
    private UserBean user;

    public SellCartBean() {
    }

    public SellCartBean(Integer sellNum, String productId, Integer userId) {
        this.sellNum = sellNum;
        this.productId = productId;
        this.userId = userId;
    }

    public Integer getSellCartId() {
        return sellCartId;
    }

    public void setSellCartId(Integer sellCartId) {
        this.sellCartId = sellCartId;
    }

    public Integer getSellNum() {
        return sellNum;
    }

    public void setSellNum(Integer sellNum) {
        this.sellNum = sellNum;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public ProductBean getProduct() {
        return product;
    }

    public void setProduct(ProductBean product) {
        this.product = product;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    @Override
    public String toString() {
        return "SellCartBean{" +
                "sellCartId=" + sellCartId +
                ", sellNum=" + sellNum +
                ", productId='" + productId + '\'' +
                ", userId=" + userId +
                ", product=" + product +
                ", user=" + user +
                '}' + "\n";
    }
}
